from django.db import models

# Create your models here.

class DepartmentModel(models.Model):
    name=models.CharField(max_length=12)
    kind=models.CharField(max_length=12)
    address=models.CharField(max_length=12)

    class Meta:
        db_table='department'
class StaffModel(models.Model):
    url=models.TextField(default="")
    number=models.CharField(max_length=12)
    name=models.CharField(max_length=12)
    major=models.CharField(max_length=12)
    starttime=models.DateField(auto_now_add=True)
    endtime=models.DateField()
    flag=models.BooleanField(default=True)
    department=models.ForeignKey(DepartmentModel,on_delete=models.CASCADE)
    class Meta:
        db_table='staff'



